screen 0,160,250
cls 1
mes "LOAD FILE NAME"
var4load_pic_name=""
input var4load_pic_name,120,20
ID4load_pic_name=stat
button "ǂݍ",*l_pic_load
mes "SAVE FILE NAME"
var4save_pic_name=""
input var4save_pic_name,120,20
ID4save_pic_name=stat
button "ۑ",*l_pic_save
mes "win_size"
var4win_size=""
input var4win_size,120,20
ID4win_size=stat
button "ϊ",*l_do_chg
button "eXg",*l_do_test
screen 1,160,100
cls 2
screen 2,160,100
cls 3
stop
*l_pic_save
	gsel 1
	bmpsave var4save_pic_name
	stop
*l_pic_load
	gsel 1
	picload var4load_pic_name
	pic_x=ginfo_winx
	pic_y=ginfo_winy
	gsel 0
	var4win_size=""+pic_x+","+pic_y
	objprm ID4win_size,var4win_size
	stop
*l_do_chg
	gsel 1
	pic_x=ginfo_winx
	pic_y=ginfo_winy

	color 1,1,1
	repeat pic_y
		this_y=cnt
		repeat pic_x
			this_x=cnt
			pget this_x,this_y
				if ginfo_r==0{
					if ginfo_g==0{
						if ginfo_b==0{
							color 1,1,1
							pset this_x,this_y
						}
					}
				}
		loop
	loop

	color 0,0,0
	pget 0,0
	the_r=ginfo_r
	the_g=ginfo_g
	the_b=ginfo_b
	repeat pic_y
		this_y=cnt
		repeat pic_x
			this_x=cnt
			pget this_x,this_y
				if ginfo_r==the_r{
					if ginfo_g==the_g{
						if ginfo_b==the_b{
							color 0,0,0
							pset this_x,this_y
						}
					}
				}
		loop
	loop
	stop
*l_do_test
	gsel 1
	pic_x=ginfo_winx
	pic_y=ginfo_winy
	gsel 2
	screen 2,pic_x,pic_y
	cls 3
	gmode 2,pic_x,pic_y
	gcopy 1,0,0,pic_x,pic_y
	stop